@extends('admin.container')

@section('c-head')
    <script type="text/javascript">
        var PAGE_DATA = {
            // 编辑
            @if(isset($editTarget))
            DEFAULT: {
                name: "{{$editTarget->name}}", //分类名称
                parent_id: "{{$editTarget->parent_id}}", //分类名称, 200001-咖啡物料
                sort: "{{$editTarget->sort}}",  //排序,0~255，数字越小越靠前。
            },
            @else
             DEFAULT: null,
            @endif
            REST_API: {
                category_url: "{{ route('admin.goods.category.parent') }}", //上级分类
            }


        };
    </script>
@stop

@section('c-body')
    <div class="comm-title">
                    <span id="page-nav" class="title-msg">
                        <!-- 品牌管理 -->
                    </span>
    </div>
    <div class="comm-body">
        <form id="main-form" style="margin-top: 20px;" action="{{$form}}" method="post">
            <input type="hidden" value="{{ csrf_token() }}" name="_token">
            @if(isset($editTarget))<input type="hidden" name="_method" value="PUT">@endif
            <div class="input-line">
                <div class="key-txt">
                    分类名称:
                </div>
                <div class="right-val">
                    <input id="brandName" name="name" style="width:100%;"/>
                </div>
            </div>
            <div class="input-line">
                <div class="key-txt">
                    上级分类:
                </div>
                <div class="right-val">
                    <select id="parent_id" name="parent_id" style="width:100%;">

                    </select>
                </div>
            </div>


            <div class="input-line">
                <div class="key-txt">
                    排序:
                </div>
                <div class="right-val">
                    <input id="sort" name="sort" style="width:100%;"/>
                </div>
            </div>
            <div class="input-line" style="height:40px;margin-top: 30px;">
                <div class="key-txt">
                </div>
                <div class="right-val">
                    <button id="submit-btn" type="button" class="am-btn am-btn-primary am-btn-lg">
                                <span style="display:block;">
                                    提交
                                </span>
                    </button>
                    <button id="cancel-btn" type="button" class="am-btn am-btn-default am-btn-lg">
                                <span style="display:block;">
                                    取消
                                </span>
                    </button>
                </div>
            </div>

        </form>

    </div>
    <script src="/assets/b2b/admin/js/libs/jquery.paging.min.js"></script>
    <script src="/assets/b2b/admin/js/libs/dialog-min.js"></script>
    <script src="/assets/b2b/admin/js/libs/jquery-ui.min.js"></script>
    <script src="/assets/b2b/admin/js/libs/jquery.validate.min.js"></script>
    <script src="/assets/b2b/admin/js/libs/messages_zh.js"></script>
    <script src="/assets/b2b/admin/js/libs/jquery.ajaxfileupload.js"></script>

    <script src="/assets/b2b/admin/js/pages/04.js"></script>
@stop

